package com.ttbj.controller.freight;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestParam;

import com.ttbj.product.bean.dto.PageGlobal;
import com.ttbj.product.bean.dto.ViewData;

/**
 * 运输单controller
 *  接单 -->接货-->到达
 * .历史订单查询接口
 * .司机抢单接口（查询抢单表是否有信息，如果有就返回）
 * .订单详情接口
 * .查询未完成订单接口
 * .司机接单接口
 * .司机接货接口
 * .司机送达接口
 * @author Medivh
 */

public interface FreightController {

	
	/**
	 * 查询订单列表
	 * @param request
	 * @param token
	 * @param isMove
	 * @param isCompl
	 * @return
	 */
	ViewData freightList(HttpServletRequest request, String token, Integer isMove,Integer isCompl,PageGlobal page);
	
	
	/**
	 * 历史订单查询
	 * @param request
	 * @param token
	 * @param isDate
	 * @return
	 */
	ViewData historyFreight(HttpServletRequest request, String token, Integer isDate);

	/**
	 * 订单详情
	 * @param request
	 * @param token
	 * @param waybillId
	 * @return
	 */
	ViewData detailFreight(HttpServletRequest request, String token, @RequestParam(required = false) Long waybillId);

	/**
	 * 未完成订单
	 * @param request
	 * @param token
	 * @return
	 */
	ViewData notCompleFreight(HttpServletRequest request, @RequestParam String token);

	/**
	 * 司机接单
	 * @param request
	 * @param token
	 * @param waybillId
	 * @return
	 * @throws Exception 
	 */
	ViewData reciveOrder(HttpServletRequest request, String token, Long waybillId) throws Exception;

	/**
	 * 司机接货
	 * @param request
	 * @param token
	 * @param senderIdcard
	 * @param webDrvId
	 * @return
	 * @throws Exception 
	 */
	ViewData reciverGoods(HttpServletRequest request, String token, String senderIdcard, Long waybillId) throws Exception;
	
	/**
	 * 司机交货
	 * @param request
	 * @param token
	 * @param senderIdcard
	 * @param webDrvId
	 * @return
	 * @throws Exception 
	 */
	ViewData deliverGoods(HttpServletRequest request, String token, String senderIdcard, Long waybillId) throws Exception;

	/**
	 * 拒单
	 * @param request
	 * @param token
	 * @param senderIdcard
	 * @param webDrvId
	 */
	ViewData pullBackOrder(HttpServletRequest request, String token,Long waybillId) throws Exception;
}
